{% extends "device.html" %}

{% block right %}
    <div class="content">
    <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/device.css">
    <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/tables.css">

      <div>
        <form id="form1" name="form1" method="post" action="">
          <label> &nbsp; 设备IP &nbsp;
          <input type="text" name="IP" /> &nbsp;
          <input type="hidden" name="Type" value="Search" />
          <input type="submit" name="Button" id="button" value="提交" />
        </form>
      </div>

        {% if results %}
        <div style="text-align;" class="tables"> 
          <table class="colorTable" style="width:98%;" border="1" cellspacing="0" cellpadding="0" align="center"> 
          <tbody> 
        
            <tr> 
            <th width="12.5%" height="15" valign="top" bgcolor="#CCCCCC"> 
            <p align="center">设备IP</p> 
            </th> 
            <th width="12.5%"  valign="top" bgcolor="#CCCCCC"> 
            <p align="center">CPU信息</p> 
            </th> 
            <th width="12.5%" valign="top" bgcolor="#CCCCCC"> 
            <p align="center">内存信息</p> 
            </th> 
            <th width="12.5%" valign="top" bgcolor="#CCCCCC"> 
            <p align="center">磁盘信息</p> 
            </th> 
            <th width="12.5%" valign="top" bgcolor="#CCCCCC"> 
            <p align="center">设备位置</p> 
            </th> 
            <th width="12.5%" valign="top" bgcolor="#CCCCCC"> 
            <p align="center">设备状态</p> 
            </th> 
            <th width="12.5%" valign="top" bgcolor="#CCCCCC"> 
            <p align="center">所运行服务</p> 
            </th> 
            <th width="12.5%" valign="top" bgcolor="#CCCCCC"> 
            <p align="center">所属人</p> 
            </th> 
            </tr> 
            
            {% for bd in results %}
            <tr> 
            </td height=10 > 
            <td > 
            <p>{{ bd.Ip }}</p>
            </td> 
            <td > 
            <p>{{ bd.Cpu }}</p> 
            </td> 
            <td > 
            <p>{{ bd.Mem }}</p>
            </td> 
            <td > 
            <p>{{ bd.Disk }}</p> 
            </td> 
            <td > 
            <p>{{ bd.Position }}</p> 
            </td> 
            <td > 
            <p>{{ bd.State }}</p> 
            </td> 
            <td > 
            <p>{{ bd.Server }}</p> 
            </td> 
            <td > 
            <p>{{ bd.Owner }}</p> 
            </td> 
            </tr> 
            {% endfor %}
        
          </tbody> 
          </table>
        </div> 
        {% endif %}

    </div>  
{% endblock %}
